package practice3;

import java.util.Scanner;

public class P8738 {
    public static void main(String[] args) {
        String[] tianGan = {"jia","yi","bing","ding","wu","ji","geng","xin","ren","gui"};
        String[] diZhi = {"zi","chou","yin","mao","chen","si","wu","wei","shen","you","xu","hai"};
        Scanner sc = new Scanner(System.in);
        int year = sc.nextInt();
        int i = 6;      //2020年的下标
        int j= 0;
        if(year>=2020){
            int offset1 = (year-2020)%10;
            if(i+offset1>=10){
                i=i+offset1-10;
            }else{
                i=i+offset1;
            }
            int offset2 = (year-2020)%12;
            if(j+offset2>=12){
                j=j+offset2-12;
            }else {
                j=j+offset2;
            }
            System.out.println(tianGan[i]+diZhi[j]);
        }else{
            int offset1= (2020-year)%10;
            if(i-offset1<0){
                i=i-offset1+10;
            }else{
                i=i-offset1;
            }
            int offset2= (2020-year)%12;
            if(j-offset2<0){
                j=j-offset2+12;
            }else{
                j=j-offset2;
            }
            System.out.println(tianGan[i]+diZhi[j]);
        }
    }
}
